/**
 * 
 */
package jxc.data.hibernate.dao;

import java.util.List;

import org.hibernate.Query;

import jxc.data.hibernate.pojo.Provider;

/**
 * @author wzz
 *
 */
public class ProviderDAO extends HibernateBaseDAO<Provider> {

	public List<Provider> getAll(){
		return this.listByHQL("from Provider");
	}
	
	public Provider getById(String id){
		String hql="from Provider where id=:id";
		Query query=session.createQuery(hql);
		query.setString("id", id);
		Provider p= (Provider) query.uniqueResult();
		return p;
	}
}
